

<template>
<div style="height: 100%">
  <!-- 弹窗 -->
  <el-dialog v-model="store.openAddQuestion"  :show-close="false" append-to-body class="dialogClass"  fullscreen draggable overflow >
    <!--弹窗标题-->
    <template #header="{ close, titleId }">
      <div class="dialogHeader">
        <el-icon style="font-size: 18px;margin-top: 14px;cursor: pointer" @click="closeDialog()" >
          <CloseBold/>
        </el-icon>
      </div>
    </template>
    <!--弹窗内容-->
    <template #default>
      <exam-add-question :examId="store.addExamQuestionId" style="width: 100%; height: 89vh"/>
    </template>
  </el-dialog>
</div>
</template>
<script setup lang="ts">

import {CloseBold} from "@element-plus/icons-vue";
import {examBaseStore} from "@/stores/question/examStore.ts";
import ExamAddQuestion from "@/components/exam/examAddQuestion.vue";
import {defineEmits} from "vue";
const store=examBaseStore()
const emit = defineEmits(['refresh'])
const  closeDialog=()=>{
  store.setOpenAddQuestion(false)
  store.setAddExamQuestionId(0)
  emit("refresh")
}
</script>
<style scoped>
.dialogClass{
}
.dialogClass .el-dialog__body{
  min-height: 300px;
  max-height: 600px;
  overflow: auto;
}
.el-dialog .el-dialog__header {
  margin: 0 !important;
  padding: 0 !important;
}

.el-dialog .dialogHeader {
  display: flex;
  flex-direction: row;
  justify-content: right;
  height: 40px;
  margin: 0 10px;
  font-size: 18px;
  font-weight: bolder;
}
</style>